POV-Ray : Newsgroups : povray.newusers : Image_map like decals : Re: Image_map like decals Server Time
29 Jul 2024 08:17:53 EDT (-0400)
  Re: Image_map like decals  
From: danyolgiax
Date: 3 May 2006 06:50:01
Message: <web.44588abc319c0b1aa8eb78fb0@news.povray.org>
Yes! It helps! Thanks!

Theres a related problem... if I want to create a bump map for the same png
in texture?

in bump_map I cannot specify "scale"!!!


"Chris B" <c_b### [at] btconnectcomnospam> wrote:
> "danyolgiax" <d.o### [at] gmailcom> wrote in message
> news:web.44586fbe319c0b1aa8eb78fb0@news.povray.org...
> >
> > note that train.png is 300x100 png image!
> >
> > Ok it works! but I can't understand those values:
> >
> > translate <1.5,0.5,0>
> > scale <3,0,0>
> > translate <-4.5,-0.5,0>
> >
>
> Hi Dany,
>
> The two translates seem to cancel each other out and the scale factor should
> be <3,1,1>.You should find a warning in the message stream to tell you that
> scaling by zero is not valid and that POV-Ray has automatically substituted
> '1's where you specified '0's
>
> Despite the resolution of the image, it will always get mapped initially to
> a 1 unit square with it's bottom left corner at the origin and  its top
> right corner at x=1,y=1. By scaling the image up by a factor of 3 in the 'x'
> dimension you effectively restore the original proportions of the image.
>
> Scaling takes place relative to the origin, so when you use translate
> '<1.5,0.5,0>' you move the bottom left corner to x=1.5,y=0.5, then scaling
> by x*3,y*1 puts the bottom left corner at x=4.5,y=0.5. Your second translate
> therefore moves the bottom left corner back to the origin.
>
> So, all in all these three lines do the same as just specifying:
> scale <3,1,1>
>
> Hope this helps,
>
> Regards,
> Chris B.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.